home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cmdline.lha / cmdline / doc / caveats.man < prev    next >
Text File  |  1992-08-03  |  1KB  |  33 lines

  1. .SH CAVEATS
  2. When an argument takes a required value and the value is in a separate
  3. token from the argument (as in "\fB\-c\ \ \fIvalue\fR") then the next
  4. token on the command-line is assumed to be the value for that argument
  5. (even if the token \fIlooks\fP like an option because its starts with
  6. a `\-' character).
  7.  
  8. If however, an argument takes an \fIoptional\fP value and the value is
  9. in a separate token from the argument, the next token on the command-line
  10. is assumed to be the value for that argument \fIonly if the next token
  11. does \s-1NOT\s+1 look like an option\fP.  In order to specify a value
  12. that looks like an option to an argument that takes an optional value,
  13. it is recommended that the value occur in the same token as the argument
  14. itself (as in "\fB\-c\fI\-value\fR").
  15.  
  16. The above also applies to non-positional lists.  A non-positional list
  17. is automatically terminated by another option, or by the token ``\*(--''.
  18. It is a "feature" of \*(NM that the following are equivalent (assuming
  19. that \fB\-l\fP takes a list of one or more values):
  20.  
  21. .XS
  22. cmdname \-l value1 value2 
  23. cmdname \-lvalue1 \-lvalue2
  24. .XE
  25.  
  26. Hence, to supply values that look like options to non-positional list
  27. arguments, it is recommended that the following syntax be used:
  28.  
  29. .XS
  30. cmdname \-l\-value1 \-l\-value2
  31. .XE
  32.  
  33.